﻿using UnityEngine;
using System.Collections;

public class TriggerMgr : MonoBehaviour {
	public static TriggerMgr Get(GameObject target,VoidDelegateGObj callback){
		TriggerMgr tr = target.AddComponent<TriggerMgr> ();
		tr.CallBack = callback;
		return tr;
	}
	public VoidDelegateGObj CallBack;
	public void OnTriggerEnter(Collider target){
		if (CallBack != null) {
			CallBack(target.gameObject);
		}
	}
}
